using System;
using System.Collections.Generic;
using System.Text;
using Grebok.Domain;

namespace Grebok.Persistence.AdoNet
{
    /// <summary>
    /// A Customer proxy implementing offline optimistic locking capabilities
    /// </summary>
    internal class CustomerProxy : Customer
    {
        private string id = string.Empty;
        private string companyName = string.Empty;
        private string phoneNumber = string.Empty;
        private string faxNumber = string.Empty;
        private AddressInfo addressInfo = new AddressInfo();
        private ContactInfo contactInfo = new ContactInfo();

        public string OriginalId
        {
            get
            {
                return id;
            }
            set
            {
                id = value;
            }
        }

        public string OriginalCompanyName
        {
            get
            {
                return companyName;
            }
            set
            {
                companyName = value;
            }
        }

        public string OriginalPhoneNumber
        {
            get
            {
                return phoneNumber;
            }
            set
            {
                phoneNumber = value;
            }
        }

        public string OriginalFaxNumber
        {
            get
            {
                return faxNumber;
            }
            set
            {
                faxNumber = value;
            }
        }

        public AddressInfo OriginalAddressInfo
        {
            get
            {
                return addressInfo;
            }
            set
            {
                addressInfo = value;
            }
        }

        public ContactInfo OriginalContactInfo
        {
            get
            {
                return contactInfo;
            }
            set
            {
                contactInfo = value;
            }
        }
    }
}
